package com.nanyang.tms.dao.saleproduct;

import com.nanyang.tms.domain.product.ProductWeightRuleVO;
import com.nanyang.tms.domain.saleproduct.SaleProductWeightRuleDO;
import com.nanyang.tms.domain.saleproduct.SaleProductWeightRuleVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>SaleProductWeightRuleDao.java</p>
 * <p>Description:()</p>
 *
 * @author lv
 * @date 2022年11月12日 下午05:38:21
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface SaleProductWeightRuleDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(SaleProductWeightRuleDO record);


    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return SaleProductWeightRuleDO
     */
    SaleProductWeightRuleDO selectByPrimaryKey(Long id);

    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(SaleProductWeightRuleDO record);
    /**
     * 根据模块编号查询
     * @param weightModelCode
     * @return
     */
    List<SaleProductWeightRuleVO> selectByModelCode(String weightModelCode);
    List<SaleProductWeightRuleVO> listWeightRuleByProductCode(String saleProductCode);
}